<?php
$page = 'GT5';
$in_site = 'dassnfu';
$loginVereist = 2;
include($_SERVER['DOCUMENT_ROOT']."/start.php");

$bestanden = "<link rel='stylesheet' type='text/css' href='/bestanden/css/post/post.css' />
<link rel='stylesheet' type='text/css' href='/bestanden/css/style_tabellen.css' />";

include_once($_SERVER['DOCUMENT_ROOT']."/php_functions/database_connectie.php");
include_once($_SERVER['DOCUMENT_ROOT']."/header.php");
include_once($_SERVER['DOCUMENT_ROOT']."/sidebar.php");

echo $mainClass->showPageStart();

if(isset($_GET['event']) && empty($_GET['race']) && empty($_GET['uitslag'])) {
	//Haal het event op
	$result = mysql_query("SELECT * FROM event WHERE eventId = '".$_GET['event']."'");
	if($result <> null && mysql_num_rows($result) > 0) {
		while($row = mysql_fetch_array($result)) {
			echo "<h3>".$row['naam']."</h3>";
			
			echo "<div id='eventinfo' class='post'>";
			echo "<p class='meta'>Event info</p>";
			echo "<div class='entry'>";
			//echo "<img src='http://online-racing.nl/wp-content/uploads/2012/08/Lexus-GT500-klasse-Nurburgring-GP-F.jpg' alt='' height='250px'><br>";
			if(isset($row['omschrijving'])) {
				echo "<p>".$row['omschrijving']."</p>";
			}
			if(isset($row['regels'])) {
				echo "<h3 style='margin-top: 20px;'>Regels</h3>";
				echo "<p>".$row['regels']."</p>";
			}
			
			// HAAL DE CIRCUITS OP
			$result2 = mysql_query("SELECT eventraceId, circuit, datum FROM eventrace WHERE eventId = '".$_GET['event']."'");
			if($result2 <> null && mysql_num_rows($result2) > 0) {
				echo "<h3 style='margin-top: 20px;'>Circuits</h3>";
					echo "<ol>";
						while($row2 = mysql_fetch_array($result2)) {
								echo "<li><a href='./?event=".$_GET['event']."&race=".$row2['eventraceId']."'>".$row2['circuit']."</a></li>";
						}
					echo "</ol>";
			}
			
			// AUTO'S
			echo "<h3 style='margin-top: 20px;'>Auto's</h3>";
			// VERSCHILLENDE AUTOS PER RACE
			if($row['verschillendeAutos'] == 1) {
				echo "<p>Per race worden er verschillende auto's gebruikt</p>";
			}else {
				// haal de auto gegevens op
				$result2 = mysql_query("SELECT merk, naam, jaar, aandrijving, pk, gewicht, pp FROM eventauto WHERE eventId = '".$_GET['event']."'");
				if($result2 <> null && mysql_num_rows($result2) > 0) {
					echo "<p>De toegestaande auto's zijn:</p>";
					echo "<ul>";
						while($row2 = mysql_fetch_array($result2)) {
							echo "<li><i>".$row2['merk']."</i> ".$row2['naam']." '".($row2['jaar']%100)."</li>";
						}
					echo "</ul>";
				}else {
					echo "<p>Er zijn nog geen autogegevens bekend voor dit event.</p>";
				}
			}
			
			// INSTELLINGEN
			// haal de instellingen op
			$result2 = mysql_query("SELECT * FROM eventinstellingen WHERE eventId = '".$_GET['event']."'");
			if($result2 <> null && mysql_num_rows($result2) > 0) {
				echo "<h3 style='margin-top: 20px;'>Race instellingen".(empty($_GET['instellingen']) ? " <a style='font-size: 12px; font-weight: normal;' href='./?event=".$_GET['event']."&instellingen=1'>(alle instellingen)</a>" : "")."</h3>";
				echo "<table class='ordered_list'>";
				while($row2 = mysql_fetch_array($result2)) {
					// speltype
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Speltype</td><td>";
								if($row2['speltype'] == 0) { 		echo "-";}
								else if($row2['speltype'] == 1) {	echo "normale race";}
								else if($row2['speltype'] == 2) {	echo "rouletterace";}
							echo "</td></tr>";
					}
					// starttype
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>starttype</td><td>";
								if($row2['starttype'] == 0) { 		echo "-";}
								else if($row2['starttype'] == 1) {	echo "normale start";}
								else if($row2['starttype'] == 2) {	echo "normale start met valsestartcontrole";}
							echo "</td></tr>";
					}
					// volgorde startopstelling
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Volgorde startopstelling</td><td>";
								if($row2['volgordeStartopstelling'] == 0) { 		echo "-";}
								else if($row2['volgordeStartopstelling'] == 1) {	echo "snelste eerst";}
								else if($row2['volgordeStartopstelling'] == 2) {	echo "traagste eerst";}
								else if($row2['volgordeStartopstelling'] == 3) {	echo "startopstelling op basis van vorige uitslag";}
								else if($row2['volgordeStartopstelling'] == 4) {	echo "omgekeerde startopstelling op basis van vorige uitslag";}
							echo "</td></tr>";
					}
					// boost
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Boost</td><td>";
							if($row2['boost'] == 0) { 		echo "-";}
							else if($row2['boost'] == 1) {	echo "geen";}
							else if($row2['boost'] == 2) {	echo "weinig";}
							else if($row2['boost'] == 3) {	echo "veel";}
						echo "</td></tr>";
					// straf
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Straf</td><td>";
							if($row2['straf'] == 0) { 		echo "-";}
							else if($row2['straf'] == 1) {	echo "geen";}
							else if($row2['straf'] == 2) {	echo "licht";}
							else if($row2['straf'] == 3) {	echo "zwaar";}
						echo "</td></tr>";
					// finishlimiet
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Finishlimiet</td><td>".(empty($row2['finishlimiet']) ? "-" : $row2['finishlimiet'])."</td></tr>";
					}
					// zichtbare schade
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Zichtbare schade</td><td>";
								if($row2['zichtbareSchade'] == 0) {		echo "-";}
								else if($row2['zichtbareSchade'] == 1) {	echo "aan";}
								else if($row2['zichtbareSchade'] == 2) {	echo "uit";}
							echo "</td></tr>";
					}
					// mechanische schade
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Mechanische schade</td><td>";
								if($row2['mechanischeSchade'] == 0) {		echo "-";}
								else if($row2['mechanischeSchade'] == 1) {	echo "geen";}
								else if($row2['mechanischeSchade'] == 2) {	echo "licht";}
								else if($row2['mechanischeSchade'] == 3) {	echo "zwaar";}
							echo "</td></tr>";
					}
					// botsingen uitschakelen
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Botsingen uitschakelen</td><td>";
								if($row2['botsingenUitschakelen'] == 0) {		echo "-";}
								else if($row2['botsingenUitschakelen'] == 1) {	echo "aan";}
								else if($row2['botsingenUitschakelen'] == 2) {	echo "uit";}
							echo "</td></tr>";
					}
					// slipstreameffect
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Slipstreameffect</td><td>";
								if($row2['slipstreameffect'] == 0) {		echo "-";}
								else if($row2['slipstreameffect'] == 1) {	echo "sterk";}
								else if($row2['slipstreameffect'] == 2) {	echo "zwak";}
							echo "</td></tr>";
					}
					// bandenslijtage
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Bandenslijtage</td><td>";
								if($row2['bandenslijtage'] == 0) {		echo "-";}
								else if($row2['bandenslijtage'] == 1) {	echo "geen";}
								else if($row2['bandenslijtage'] == 2) {	echo "normaal";}
								else if($row2['bandenslijtage'] == 3) {	echo "snel";}
								else if($row2['bandenslijtage'] == 4) {	echo "heel snel";}
							echo "</td></tr>";
					}
					// gripreductie
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Gripreductie</td><td>";
								if($row2['gripreductie'] == 0) {		echo "-";}
								else if($row2['gripreductie'] == 1) {	echo "zwak";}
								else if($row2['gripreductie'] == 2) {	echo "realistisch";}
							echo "</td></tr>";
					}
					// rouletteinstelling
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Rouletteinstelling</td><td>".(empty($row2['rouletteinstelling']) ? "-" : $row2['rouletteinstelling'])."</td></tr>";
					}
					// rouletteverhouding
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Rouletteverhouding</td><td>".(empty($row2['rouletteverhouding']) ? "-" : $row2['rouletteverhouding']-1)."</td></tr>";
					}
					// autoristricties
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Autoristricties</td><td>";
								if($row2['autoristricties'] == 0) {			echo "-";}
								else if($row2['autoristricties'] == 1) {	echo "geen ristricties";}
								else if($row2['autoristricties'] == 2) {	echo "uit garage kiezen";}
								else if($row2['autoristricties'] == 3) {	echo "kart";}
								else if($row2['autoristricties'] == 4) {	echo "ferrari F1";}
								else if($row2['autoristricties'] == 5) {	echo "super GT300-klasse";}
								else if($row2['autoristricties'] == 6) {	echo "super GT500-klasse";}
								else if($row2['autoristricties'] == 7) {	echo "nascar";}
								else if($row2['autoristricties'] == 8) {	echo "moderne rallywagens";}
								else if($row2['autoristricties'] == 9) {	echo "le Mans-prototypen";}
								else if($row2['autoristricties'] == 10) {	echo "toerwagenklasse";}
								else if($row2['autoristricties'] == 11) {	echo "klassieke musclecars";}
								else if($row2['autoristricties'] == 12) {	echo "Japanse lichtgewicht auto's";}
								else if($row2['autoristricties'] == 13) {	echo "straat-ferrari's";}
								else if($row2['autoristricties'] == 14) {	echo "straat-lamborghini's";}
							echo "</td></tr>";
					}
					// prestatiepunten
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Prestatiepunten</td><td>";
							if($row2['prestatiepunten'] == 0) {			echo "-";}
							else if($row2['autoristricties'] == 1) {	echo "geen limiet";}
							else {										echo $row2['autoristricties'];}
						echo "</td></tr>";
					// vermogen
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Vermogen</td><td>";
							if($row2['vermogen'] == 0) {		echo "-";}
							else if($row2['vermogen'] == 1) {	echo "geen limiet";}
							else {								echo $row2['vermogen'];}
						echo "</td></tr>";
					// gewicht
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Gewicht</td><td>";
							if($row2['gewicht'] == 0) {			echo "-";}
							else if($row2['gewicht'] == 1) {	echo "geen limiet";}
							else {								echo $row2['gewicht'];}
						echo "</td></tr>";
					// aandrijflijn
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Aandrijflijn</td><td>";
							$komma = false;
							if($row2['Aandrijflijn'] == 0) {	echo "-";}
							else {
								if(($row2['aandrijflijn'] & (1 << 0)) > 0) {	echo "FR";		$komma = true;}
								if(($row2['aandrijflijn'] & (1 << 1)) > 0) {	echo ($komma ? ", " : "")."FF";		$komma = true;}
								if(($row2['aandrijflijn'] & (1 << 2)) > 0) {	echo ($komma ? ", " : "")."4WD";	$komma = true;}
								if(($row2['aandrijflijn'] & (1 << 3)) > 0) {	echo ($komma ? ", " : "")."MR";		$komma = true;}
								if(($row2['aandrijflijn'] & (1 << 4)) > 0) {	echo ($komma ? ", " : "")."RR";		$komma = true;}
							}
						echo "</td></tr>";
					// bandenristricties
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Bandenristricties</td><td>";
							if($row2['bandenristricties'] == 0) {		echo "-";}
							else if($row2['bandenristricties'] == 1) {	echo "geen ristricties";}
							else if($row2['bandenristricties'] == 2) {	echo "comfort: hard";}
							else if($row2['bandenristricties'] == 3) {	echo "comfort: normaal";}
							else if($row2['bandenristricties'] == 4) {	echo "comfort: zacht";}
							else if($row2['bandenristricties'] == 5) {	echo "sport: hard";}
							else if($row2['bandenristricties'] == 6) {	echo "sport: normaal";}
							else if($row2['bandenristricties'] == 7) {	echo "sport: zacht";}
							else if($row2['bandenristricties'] == 8) {	echo "race: hard";}
							else if($row2['bandenristricties'] == 9) {	echo "race: normaal";}
							else if($row2['bandenristricties'] == 10) {	echo "race: zacht";}
						echo "</td></tr>";
					// tuning
					if(!empty($_GET['instellingen'])) {
						echo "<tr>";
							echo "<td>&bull;</td>";
							echo "<td>Tuning</td><td>";
								if($row2['tuning'] == 0) {		echo "-";}
								else if($row2['tuning'] == 1) {	echo "geen limiet";}
								else if($row2['tuning'] == 2) {	echo "verboden";}
							echo "</td></tr>";
					}
					// hulpmiddelen
					echo "<tr>";
						echo "<td>&bull;</td>";
						echo "<td>Hulpmiddelen</td><td>";
							if($row2['hulpmiddelen'] == 0) {		echo "-";}
							else {
								echo "<span class='icon_font'>".(($row2['hulpmiddelen'] & (1 << 0)) > 0 ? "&#x44;" : "&#x46;")."</span>&nbsp;&nbsp;&nbsp;slipherstel<br>";
								echo "<span class='icon_font'>".(($row2['hulpmiddelen'] & (1 << 1)) > 0 ? "&#x44;" : "&#x46;")."</span>&nbsp;&nbsp;&nbsp;stuurhulp<br>";
								echo "<span class='icon_font'>".(($row2['hulpmiddelen'] & (1 << 2)) > 0 ? "&#x44;" : "&#x46;")."</span>&nbsp;&nbsp;&nbsp;ASM<br>";
								echo "<span class='icon_font'>".(($row2['hulpmiddelen'] & (1 << 3)) > 0 ? "&#x44;" : "&#x46;")."</span>&nbsp;&nbsp;&nbsp;ideale lijn<br>";
								echo "<span class='icon_font'>".(($row2['hulpmiddelen'] & (1 << 4)) > 0 ? "&#x44;" : "&#x46;")."</span>&nbsp;&nbsp;&nbsp;tractiecontrole<br>";
								echo "<span class='icon_font'>".(($row2['hulpmiddelen'] & (1 << 5)) > 0 ? "&#x44;" : "&#x46;")."</span>&nbsp;&nbsp;&nbsp;ABS";
							}
						echo "</td></tr>";
				}
				echo"</table>";
			}
			
			// EINDE BLOK
			echo "</div>";
			echo "</div>";
		}
	}
/*
			echo "<div id='eventrace' class='post'>";
			echo "<p class='meta'>TUSSENSTAND</p>";
			echo "<div class='entry'>";
			echo "<table class='list padding'>";
				echo "<tr>";
					echo "<th>#</th>";	
					echo "<th>Naam</th>";
					echo "<th class='left_align'>Totaal</th>";
					echo "<th>&nbsp;</th>";
					echo "<th class='center_align'>1</th>";
					echo "<th class='center_align'>2</th>";
				echo "</tr>";
				echo "<tr>";
					echo "<td style='color: black;'>1.</td>";	
					echo "<td style='color: black;'>Jutje</td>";
					echo "<td class='center_align' style='color: black;'>43</td>";
					echo "<td>&nbsp;</td>";
					echo "<td class='center_align' style='color: black;'>25</td>";
					echo "<td class='center_align'>18</td>";
				echo "</tr>";
				echo "<tr>";
					echo "<td>2.</td>";
					echo "<td>slapo</td>";
					echo "<td class='center_align' style='color: black;'>30</td>";
					echo "<td>&nbsp;</td>";
					echo "<td class='center_align'>5</td>";
					echo "<td class='center_align' style='color: black;'>25</td>";
				echo "</tr>";
				echo "<tr>";
					echo "<td>3.</td>";	
					echo "<td>GT_protera</td>";
					echo "<td class='center_align' style='color: black;'>18</td>";
					echo "<td>&nbsp;</td>";
					echo "<td class='center_align'>18</td>";
					echo "<td class='center_align'>-</td>";
				echo "</tr>";
				echo "<tr>";
					echo "<td>4.</td>";
					echo "<td>doafgoa</td>";
					echo "<td class='center_align' style='color: black;'>15</td>";
					echo "<td>&nbsp;</td>";
					echo "<td class='center_align'>10</td>";
					echo "<td class='center_align'>5</td>";
				echo "</tr>";
			echo "</table>";
			echo "</div>";
			echo "</div>";
			
	}
	
	
	echo "<h3>GT500 klasse</h3>";
	//echo "<div class='left' style='float: left; width: 350px;'>";
	echo "<div id='eventinfo' class='post'>";
	echo "<p class='meta'>Event info</p>";
	echo "<div class='entry'>";
	//echo "<img src='http://online-racing.nl/wp-content/uploads/2012/08/Lexus-GT500-klasse-Nurburgring-GP-F.jpg' alt='' height='250px'><br>";
	echo "<p>Dit is de GT500 klasse, deze serie bestaat uit 8 races. De races worden gehouden op verschillende circuits. Iedere week is er een race en deze worden gereden op de vrijdag.</p>";
	
	echo "<h3 style='margin-top: 20px;'>Regels</h3>";
	echo "<p>Er wordt gebruik gemaakt van de standaard GT5 Pro regels</p>";
	echo "<h3 style='margin-top: 20px;'>Circuits</h3>";
	echo "<ol>";
		echo "<li><a href='./?event=1&race=1'>Silverstone</a></li>";
		echo "<li><a href='./?event=1&race=2'>Nurgburgring GP/F</a></li>";
		echo "<li><a href='./?event=1&race=3'>Tsukuba</a></li>";
		echo "<li><a href='./?event=1&race=4'>n.n.b.</a></li>";
		echo "<li><a href='./?event=1&race=5'>n.n.b.</a></li>";
		echo "<li><a href='./?event=1&race=6'>n.n.b.</a></li>";
		echo "<li><a href='./?event=1&race=7'>n.n.b.</a></li>";
		echo "<li><a href='./?event=1&race=8'>n.n.b.</a></li>";
	echo "</ol>";
	echo "<h3 style='margin-top: 20px;'>Auto's</h3>";
	echo "<p>De toegestaande auto's zijn:</p>";
	echo "<ul>";
		echo "<li>Lexus, Broekline</li>";
		echo "<li>Alfa Romeo, Uno Duno</li>";
		echo "<li>Mercedes, C120</li>";
	echo "</ul>";
	echo "</div>";
	echo "</div>";
	
	echo "<div id='eventrace' class='post'>";
	echo "<p class='meta'>TUSSENSTAND</p>";
	echo "<div class='entry'>";
	echo "<table class='list padding'>";
		echo "<tr>";
			echo "<th>#</th>";	
			echo "<th>Naam</th>";
			echo "<th class='left_align'>Totaal</th>";
			echo "<th>&nbsp;</th>";
			echo "<th class='center_align'>1</th>";
			echo "<th class='center_align'>2</th>";
		echo "</tr>";
		echo "<tr>";
			echo "<td style='color: black;'>1.</td>";	
			echo "<td style='color: black;'>Jutje</td>";
			echo "<td class='center_align' style='color: black;'>43</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align' style='color: black;'>25</td>";
			echo "<td class='center_align'>18</td>";
		echo "</tr>";
		echo "<tr>";
			echo "<td>2.</td>";
			echo "<td>slapo</td>";
			echo "<td class='center_align' style='color: black;'>30</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align'>5</td>";
			echo "<td class='center_align' style='color: black;'>25</td>";
		echo "</tr>";
		echo "<tr>";
			echo "<td>3.</td>";	
			echo "<td>GT_protera</td>";
			echo "<td class='center_align' style='color: black;'>18</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align'>18</td>";
			echo "<td class='center_align'>-</td>";
		echo "</tr>";
		echo "<tr>";
			echo "<td>4.</td>";
			echo "<td>doafgoa</td>";
			echo "<td class='center_align' style='color: black;'>15</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align'>10</td>";
			echo "<td class='center_align'>5</td>";
		echo "</tr>";
	echo "</table>";
	echo "</div>";
	echo "</div>";
	*/
}else if(isset($_GET['event']) && isset($_GET['race'])) {
	// UITSLAGEN VAN DE RACES WEERGEVEN
	echo "<h3>GT500 event (race 1/8)</h3>";
	echo "<span class='button' style='margin: 10px 5px 0px;'><a href='./?event=".$_GET['event']."'><span class='icon_font'>B</span> Terug</a></span>";
	echo "<span class='button' style='margin: 10px 5px 0px;'><a href='./?event=".$_GET['event']."&race=".$_GET['race']."&inschrijven=1'><span class='icon_font'>&#x44;</span> Doe mee</a></span>";
	echo "<div id='eventinfo' class='post'>";
		echo "<p class='meta'>Race info</p>";
		echo "<div class='entry'>";
		//echo "<img src='http://online-racing.nl/wp-content/uploads/2012/08/Lexus-GT500-klasse-Nurburgring-GP-F.jpg' alt='' height='250px'><br>";
		echo "<p>Dit is de 1e race van het GT500 kampioenschap. De race wordt gehouden op het circuit van Silverstone en er worden 20 rondes gereden.</p>";
		
		echo "<h3 style='margin-top: 20px;'>Circuits</h3>";
		echo "<p>Silverstone</p>";
		
		echo "<h3 style='margin-top: 20px;'>Auto's</h3>";
		echo "<p>De toegestaande auto's zijn:</p>";
		echo "<ul>";
			echo "<li>Lexus, Broekline</li>";
			echo "<li>Alfa Romeo, Uno Duno</li>";
			echo "<li>Mercedes, C120</li>";
		echo "</ul>";
		
		echo "<h3 style='margin-top: 20px;'>Inschrijvingen</h3>";
		echo "<ol>";
			echo "<li>Jutje</li>";
			echo "<li>GT_protera</li>";
			echo "<li>GT_tiona</li>";
		echo "</ol>";
		echo "</div>";
	echo "</div>";
	echo "<div id='eventrace' class='post'>";
		echo "<p class='meta'>Silverstone &bull; 22-11-2012 &bull; race 1/8</p>";
		echo "<div class='entry'>";
		echo "<table class='list padding'>";
			echo "<tr>";
				echo "<td style='color: black;'>1.</td>";	
				echo "<td style='color: black;'>Jutje</td>";
				echo "<td style='color: black;'>1:15:23,142</td>";
				echo "<td>&nbsp;</td>";
				echo "<td style='color: black; font-weight: bold;'>25</td>";
				echo "<td style='color: black; font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>2.</td>";	
				echo "<td>GT_protera</td>";
				echo "<td>1:16:23,142</td>";
				echo "<td>+0:12,314</td>";
				echo "<td style='font-weight: bold;'>16</td>";
				echo "<td style='font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>3.</td>";
				echo "<td>doafgoa</td>";
				echo "<td>1:16:24,142</td>";
				echo "<td>+0:12,921</td>";
				echo "<td style='font-weight: bold;'>10</td>";
				echo "<td style='font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>4.</td>";
				echo "<td>slapo</td>";
				echo "<td>1:16:28,142</td>";
				echo "<td>+0:16,921</td>";
				echo "<td style='font-weight: bold;'>5</td>";
				echo "<td style='font-style: italic;'>Mercedes, C120</td>";
			echo "</tr>";
		echo "</table>";
		echo "</div>";
	echo "</div>";
	
	echo "<div id='eventrace' class='post'>";
		echo "<p class='meta'>Reacties</p>";
		echo "<div class='entry'>";
		echo "</div>";
	echo "</div>";
}else if(isset($_GET['event']) && isset($_GET['uitslagen'])) {
	// UITSLAGEN VAN DE RACES WEERGEVEN
	echo "<h3>GT500 event (uitslagen)</h3>";
	echo "<div id='eventrace' class='post'>";
		echo "<p class='meta'>Silverstone &bull; 22-11-2012 &bull; race 1/8</p>";
		echo "<div class='entry'>";
		echo "<table class='list padding'>";
			echo "<tr>";
				echo "<td style='color: black;'>1.</td>";	
				echo "<td style='color: black;'>Jutje</td>";
				echo "<td style='color: black;'>1:15:23,142</td>";
				echo "<td>&nbsp;</td>";
				echo "<td style='color: black; font-weight: bold;'>25</td>";
				echo "<td style='color: black; font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>2.</td>";	
				echo "<td>GT_protera</td>";
				echo "<td>1:16:23,142</td>";
				echo "<td>+0:12,314</td>";
				echo "<td style='font-weight: bold;'>16</td>";
				echo "<td style='font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>3.</td>";
				echo "<td>doafgoa</td>";
				echo "<td>1:16:24,142</td>";
				echo "<td>+0:12,921</td>";
				echo "<td style='font-weight: bold;'>10</td>";
				echo "<td style='font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>4.</td>";
				echo "<td>slapo</td>";
				echo "<td>1:16:28,142</td>";
				echo "<td>+0:16,921</td>";
				echo "<td style='font-weight: bold;'>5</td>";
				echo "<td style='font-style: italic;'>Mercedes, C120</td>";
			echo "</tr>";
		echo "</table>";
		echo "</div>";
	echo "</div>";
	echo "<div id='eventrace' class='post'>";
		echo "<p class='meta'>Silverstone &bull; 22-11-2012 &bull; race 2/8</p>";
		echo "<div class='entry'>";
		echo "<table class='list padding'>";
			echo "<tr>";
				echo "<td style='color: black;'>1.</td>";	
				echo "<td style='color: black;'>Jutje</td>";
				echo "<td style='color: black;'>1:15:23,142</td>";
				echo "<td>&nbsp;</td>";
				echo "<td style='color: black; font-weight: bold;'>25</td>";
				echo "<td style='color: black; font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>2.</td>";	
				echo "<td>GT_protera</td>";
				echo "<td>1:16:23,142</td>";
				echo "<td>+0:12,314</td>";
				echo "<td style='font-weight: bold;'>16</td>";
				echo "<td style='font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>3.</td>";
				echo "<td>doafgoa</td>";
				echo "<td>1:16:24,142</td>";
				echo "<td>+0:12,921</td>";
				echo "<td style='font-weight: bold;'>10</td>";
				echo "<td style='font-style: italic;'>Alfa Romeo, Uno Duno</td>";
			echo "</tr>";
			echo "<tr>";
				echo "<td>4.</td>";
				echo "<td>slapo</td>";
				echo "<td>1:16:28,142</td>";
				echo "<td>+0:16,921</td>";
				echo "<td style='font-weight: bold;'>5</td>";
				echo "<td style='font-style: italic;'>Mercedes, C120</td>";
			echo "</tr>";
		echo "</table>";
		echo "</div>";
	echo "</div>";
	
	// TUSSENSTAND
		echo "<div id='eventrace' class='post'>";
	echo "<p class='meta'>TUSSENSTAND</p>";
	echo "<div class='entry'>";
	echo "<table class='list padding'>";
		echo "<tr>";
			echo "<th>#</th>";	
			echo "<th>Naam</th>";
			echo "<th class='left_align'>Totaal</th>";
			echo "<th>&nbsp;</th>";
			echo "<th class='center_align'>1</th>";
			echo "<th class='center_align'>2</th>";
		echo "</tr>";
		echo "<tr>";
			echo "<td style='color: black;'>1.</td>";	
			echo "<td style='color: black;'>Jutje</td>";
			echo "<td class='center_align' style='color: black;'>43</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align' style='color: black;'>25</td>";
			echo "<td class='center_align'>18</td>";
		echo "</tr>";
		echo "<tr>";
			echo "<td>2.</td>";
			echo "<td>slapo</td>";
			echo "<td class='center_align' style='color: black;'>30</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align'>5</td>";
			echo "<td class='center_align' style='color: black;'>25</td>";
		echo "</tr>";
		echo "<tr>";
			echo "<td>3.</td>";	
			echo "<td>GT_protera</td>";
			echo "<td class='center_align' style='color: black;'>18</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align'>18</td>";
			echo "<td class='center_align'>-</td>";
		echo "</tr>";
		echo "<tr>";
			echo "<td>4.</td>";
			echo "<td>doafgoa</td>";
			echo "<td class='center_align' style='color: black;'>15</td>";
			echo "<td>&nbsp;</td>";
			echo "<td class='center_align'>10</td>";
			echo "<td class='center_align'>5</td>";
		echo "</tr>";
	echo "</table>";
	echo "</div>";
	echo "</div>";
}
echo $mainClass->showPageEnd();
include_once($_SERVER['DOCUMENT_ROOT']."/footer.php");
?>
